package org.jeecg.modules.zcgl.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.common.system.base.entity.DelFlagBaseEntity;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: 资产签订合同记录信息
 * @Author: jeecg-boot
 * @Date:   2021-01-26
 * @Version: V1.0
 */
@Data
@TableName("zcgl_asset_contract_log")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="zcgl_asset_contract_log对象", description="资产签订合同记录信息")
public class AssetContractLog extends DelFlagBaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;

	/**资产信息*/
    @Excel(name = "资产名称", width = 15, dictTable = "zcgl_asset_info", dicText = "asset_name", dicCode = "id", pullDown = false)
    @Dict(dictTable = "zcgl_asset_info", dicText = "asset_name", dicCode = "id")
    @ApiModelProperty(value = "资产名称")
    private String assetId;

	/**合同信息*/
    @Excel(name = "合同信息", width = 15, dictTable = "zcgl_lease_contract_info", dicText = "contract_num", dicCode = "id")
    @Dict(dictTable = "zcgl_lease_contract_info", dicText = "contract_num", dicCode = "id")
    @ApiModelProperty(value = "合同信息")
    private String leaseContractId;

    /**
     * 资产明细
     */
    @Excel(name = "资产明细", width = 15, dictTable = "zcgl_asset_info_sub", dicText = "room_name", dicCode = "id", pullDown = false)
    @Dict(dictTable = "zcgl_asset_info_sub", dicText = "room_name", dicCode = "id")
    @ApiModelProperty(value = "资产明细")
    private String assetSubId;

	/**起租时间*/
	@Excel(name = "起租时间", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "起租时间")
    private Date rentStartTime;

	/**到租时间*/
	@Excel(name = "到租时间", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "到租时间")
    private Date rentEndTime;

    /**
     * 租金单价
     */
    @Excel(name = "租金单价", width = 15)
    @ApiModelProperty(value = "租金单价")
//    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private BigDecimal rentPrice;

    /**
     * 合同状态
     */
    @Excel(name = "合同状态", width = 15, dicCode = "zcgl_contract_status")
    @Dict(dicCode = "zcgl_contract_status")
    @ApiModelProperty(value = "合同状态")
    private Integer contractStatus;
    /**
     * 月租金
     */
    @Excel(name = "月租金", width = 15)
    @ApiModelProperty(value = "月租金")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private BigDecimal monthlyRent;

    @Excel(name = "是否结束",width = 15, orderNum = "26", dicCode = "yn")
    @Dict(dicCode = "yn")
    @ApiModelProperty(value = "是否结束")
//    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Integer izEnd;
}
